﻿<%@ Page Language="C#" MasterPageFile="~/Shared/EOS.master" AutoEventWireup="True"
    Inherits="EOSCRM.Web.Forms.DanhMuc.NhanVien" CodeBehind="QLNhanVien.aspx.cs" %>

<%@ Import Namespace="EOSCRM.Web.Common" %>
<%@ Register Assembly="EOSCRM.Controls" Namespace="EOSCRM.Controls" TagPrefix="eoscrm" %>
<asp:Content ID="head" ContentPlaceHolderID="headCPH" runat="server">
    <script type="text/javascript">
    </script>
</asp:Content>
<asp:Content ID="content" ContentPlaceHolderID="mainCPH" runat="server">
    <asp:UpdatePanel ID="upnlInfor" UpdateMode="Conditional" runat="server">
        <ContentTemplate>
            <div class="crmcontainer">
                <table class="crmtable">
                    <tbody>
                        <tr>
                            <td class="crmcell right">
                                Khu vực
                            </td>
                            <td class="crmcell">
                                <div class="left">
                                    <asp:DropDownList ID="ddlKhuVuc" runat="server" AutoPostBack="true" Height="25px"
                                        Width="177px" OnSelectedIndexChanged="ddlKhuVuc_SelectedIndexChanged1">
                                    </asp:DropDownList>
                                </div>
                            </td>
                            <td class="crmcell right"></td>
                            <td class="crmcell"></td>
                        </tr>
                        <tr>
                            <td class="crmcell right">
                                Lô Cao Su
                            </td>
                            <td class="crmcell" style="width: 345px">
                                <div class="left">
                                    <asp:DropDownList ID="ddlLo" runat="server" AutoPostBack="true" Height="25px" Width="177px"
                                        OnSelectedIndexChanged="ddlLo_SelectedIndexChanged1">
                                    </asp:DropDownList>
                                </div>
                            </td>
                            <td class="crmcell right"></td>
                            <td class="crmcell"></td>
                        </tr>
                        <tr>
                            <td class="crmcell right">
                                Mã nhân viên
                            </td>
                            <td class="crmcell" style="width: 345px">
                                <div class="left">
                                    <asp:TextBox ID="txtMaNV" runat="server" Width="165px" MaxLength="20" TabIndex="1" />
                                </div>
                                <div class="left">
                                    <div class="right">
                                        Nghĩ việc :
                                    </div>
                                </div>
                                <div class="left">
                                    <asp:DropDownList runat="server" ID="ddltinhTrang">
                                        <asp:ListItem Text="Còn làm" Value="1" />
                                        <asp:ListItem Text="Đã nghĩ" Value="0" />
                                    </asp:DropDownList>
                                </div>
                            </td>
                            <td class="crmcell right">
                                Địa chỉ
                            </td>
                            <td class="crmcell" style="width: 302px">
                                <div class="left">
                                    <asp:TextBox ID="txtDiaChi" runat="server" Width="165px" MaxLength="200" TabIndex="5" />
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td class="crmcell right">
                                Tên nhân viên
                            </td>
                            <td class="crmcell" style="width: 345px">
                                <div class="left">
                                    <asp:TextBox ID="txtTenNV" runat="server" Width="165px" MaxLength="100" TabIndex="2" />
                                </div>
                            </td>
                            <td class="crmcell right">
                                CMND
                            </td>
                            <td class="crmcell" style="width: 302px">
                                <div class="left">
                                    <asp:TextBox ID="txtcmnd" runat="server" Width="165px" MaxLength="200" TabIndex="6" />
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td class="crmcell right">
                                Giới tính
                            </td>
                            <td class="crmcell" style="width: 345px">
                                <div class="left">
                                    <asp:RadioButton ID="rdYes" runat="server" Text=" Nam" Checked="true" GroupName="GioiTinh"
                                        TabIndex="3" />
                                    <asp:RadioButton ID="rdNo" runat="server" Text=" Nữ" GroupName="GioiTinh" />
                                </div>
                            </td>
                            <td class="crmcell right"></td>
                            <td class="crmcell"></td>
                        </tr>
                        <tr>
                            <td class="crmcell right">
                                Ngày sinh
                            </td>
                            <td class="crmcell" style="width: 345px">
                                <div class="left">
                                    <asp:TextBox ID="txtngaysinh" runat="server" Width="165px" MaxLength="200" TabIndex="4"
                                        tag="datevn" />
                                </div>
                            </td>
                            <td class="crmcell right">
                                Ngày vào làm
                            </td>
                            <td class="crmcell" style="width: 302px">
                                <div class="left">
                                    <asp:TextBox ID="txtngayvaolam" runat="server" Width="165px" MaxLength="200" tag="datevn"
                                        TabIndex="7" />
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td class="crmcell right">
                                Loai nhân viên
                            </td>
                            <td class="crmcell" style="width: 345px">
                                <div class="left">
                                    <asp:DropDownList ID="ddlLoaiNV" runat="server" AutoPostBack="true" Height="25px"
                                        Width="177px" TabIndex="8">
                                    </asp:DropDownList>
                                </div>
                            </td>
                            <td class="crmcell right">
                                Loai lương
                            </td>
                            <td class="crmcell" style="width: 302px">
                                <div class="left">
                                    <asp:DropDownList ID="ddlLoaiLuong" runat="server" AutoPostBack="true" Height="25px"
                                        Width="177px" TabIndex="10">
                                    </asp:DropDownList>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td class="crmcell right">
                                Nhân viên quản lý
                            </td>
                            <td class="crmcell" style="width: 345px">
                                <div class="left">
                                    <asp:DropDownList ID="ddlNVQuanly" runat="server" AutoPostBack="true" Height="25px"
                                        Width="177px" TabIndex="9">
                                    </asp:DropDownList>
                                    <asp:CheckBox ID="ckKoQuanLy" runat="server" Text=" Không có Quản Lý" OnCheckedChanged="ckKoQuanLy_CheckedChanged"
                                        Checked="false" />
                                </div>
                            </td>
                            <td class="crmcell right">
                                Mức lương
                            </td>
                            <td class="crmcell" style="width: 302px">
                                <div class="left">
                                    <asp:TextBox ID="txtluong" runat="server" Width="165px" MaxLength="200" TabIndex="11" />
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td class="crmcell right">
                            </td>
                            <td class="crmcell" style="width: 345px">
                                <div class="left">
                                    <eoscrm:Button ID="btnSave" OnClick="btnSave_Click" runat="server" CssClass="save"
                                        Text="" TabIndex="12" />
                                </div>
                                <div class="left">
                                    <eoscrm:Button ID="btnDelete" runat="server" CssClass="delete" OnClick="btnDelete_Click"
                                        TabIndex="13" />
                                </div>
                                <div class="left">
                                    <eoscrm:Button ID="btnCancel" runat="server" CssClass="button_order" Text="Refresh"
                                        OnClick="btnCancel_Click" TabIndex="13" />
                                </div>
                            </td>
                        </tr>
                    </tbody>
                </table>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    <br />
    <asp:UpdatePanel ID="upnlGrid" UpdateMode="Conditional" runat="server">
        <ContentTemplate>
            <div class="crmcontainer">
                <eoscrm:Grid ID="gvList" runat="server" UseCustomPager="true" OnRowCommand="gvList_RowCommand">
                    <PagerSettings FirstPageText="khu vực" PageButtonCount="2" />
                    <Columns>
                        <asp:TemplateField HeaderStyle-CssClass="checkbox">
                            <HeaderTemplate>
                                <input id="chkAllTop" title="Chọn hết / Bỏ chọn hết" name="chkAllTop" type="checkbox"
                                    onclick="CheckAllItems(this);" />
                            </HeaderTemplate>
                            <ItemTemplate>
                                <input id="Id" runat="server" type="hidden" value='<%# Eval("MaNV") %>' />
                                <input name="listIds" type="checkbox" value='<%# Eval("MaNV") %>' />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Mã Nhân Viên" HeaderStyle-Width="10%">
                            <ItemTemplate>
                                <asp:LinkButton ID="lnkBtnID" runat="server" CommandArgument='<%# Eval("MaNV") %>'
                                    CommandName="EditItem" Text='<%# Eval("MaNV") %>'></asp:LinkButton>
                            </ItemTemplate>
                            <ItemStyle Font-Bold="True" />
                        </asp:TemplateField>
                        <asp:BoundField HeaderText="Tên Nhân Viên" DataField="TenNV" HeaderStyle-Width="20%" />
                        <asp:TemplateField HeaderText="GioiTinh" HeaderStyle-Width="10%">
                            <ItemTemplate>
                                <asp:Label ID="lbgioitinh" runat="server" Text='<%# CheckGioiTinh(Eval("GioiTinh")) %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField HeaderText="Ngày Sinh" DataField="NgaySinh" HeaderStyle-Width="20%" />
                        <asp:BoundField HeaderText="Địa chỉ" DataField="DiaChi" HeaderStyle-Width="20%" />
                        <asp:TemplateField HeaderText="Loại NV" HeaderStyle-Width="20%">
                            <ItemTemplate>
                                <asp:Label ID="lbloainv" runat="server" Text='<%# Eval("LOAINV1.TenLoaiNV") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Loại Lương" HeaderStyle-Width="20%">
                            <ItemTemplate>
                                <asp:Label ID="lbloailuong" runat="server" Text='<%# Eval("LOAILUONG1.TenLoaiLuong") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:BoundField HeaderText="Lương" DataField="MucLuong" HeaderStyle-Width="20%" />
                    </Columns>
                </eoscrm:Grid>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>
